home *** CD-ROM | disk | FTP | other *** search
/ Ahoy 1987 March / Ahoy_Magazine_87-03_1987_Double_L.d64 / Bad Luck (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  464b  |  16 lines

  1. 0 print"[147]":poke53280,0:poke53281,0:poke646,1
  2. 1 rem commodares problem #35-4:
  3. 2 rem      bad luck
  4. 3 rem solution by
  5. 4 rem   karen middaugh
  6. 5 rem
  7. 10 dim p(12) : for j=1 to 12 : read p(j):next
  8. 20 input"year: 19";y: input "month (1-12): ";m:input "day: ";d:if d>12 then 70
  9. 30 l=int((y+3)/4):da=6+y+l+p(m)+13: if int(y/4)=y/4 and m>2 then da=da+1
  10. 40 da=int((da/7-int(da/7))*7+.5)
  11. 50 if da=5 then print"the next friday the 13th is"m"/13/"y :end
  12. 60 d=13
  13. 70 m=m+1:if m>12 then m=1:y=y+1
  14. 80 goto 30
  15. 90 data 0,3,3,6,1,4,6,2,5,7,3,5
  16.